package com.blacktea.structuralpatterns.adapterpattern.service;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * @description: 插座 适配器
 * @author: black tea
 * @date: 2023/3/19 21:26
 */
@Component
@RequiredArgsConstructor
public class Adapter implements Target {

    private final ThreePinSocket threePinSocket;

    /**
     * 目标是实现可以调用三孔插座
     */
    @Override
    public void twoSocket() {
        threePinSocket.insert();
    }

}
